/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package xmlutils;

import org.kxml.kdom.Element;


/**
 *
 * @author Administrator
 */
public class UserData {
    
    private boolean valid = false;
    
    public UserData(Element userElement){
        if (userElement != null) {            
            if(userElement.getText().equals("VALID")){
                valid = true;
            }else if(userElement.getText().equals("INVALID")){
                valid = false;
            }else {
                throw new IllegalArgumentException("xml user element: "+userElement.getText());
            }
        }            
    }

    public boolean isValid() {
        return valid;
    }
}
